/**
 * This file is part of 1genia trampoline
 * Copyright (C) 2007-2008 1genia (contact@1genia.com)
 *
 * This library is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; version 3 of the License. 
 *
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details. 
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; see the file COPYING.TXT.  If not,
 * write to the Free Software Foundation, Inc., 51 Franklin Street,
 * Fifth Floor, Boston, MA 02110-1301, USA. 
 **/
package com.genia.toolbox.security.filter;

import org.springframework.security.util.FilterChainProxy;

import com.genia.toolbox.web.filter.CustomFilter;

/**
 * {@link FilterChainProxy} that can be plugged in the filter chain of toolbox.
 */
public class CustomFilterChainProxy
    extends FilterChainProxy
    implements CustomFilter
{

  /**
   * the order of invocation.
   */
  private int order = 0;



  /**
   * Return the order value of this object, with a higher value meaning greater
   * in terms of sorting.
   * <p>
   * Normally starting with 0 or 1, with {@link #LOWEST_PRECEDENCE} indicating
   * greatest. Same order values will result in arbitrary positions for the
   * affected objects.
   * <p>
   * Higher value can be interpreted as lower priority, consequently the first
   * object has highest priority (somewhat analogous to Servlet
   * "load-on-startup" values).
   * <p>
   * Note that order values below 0 are reserved for framework purposes.
   * Application-specified values should always be 0 or greater, with only
   * framework components (internal or third-party) supposed to use lower
   * values.
   * 
   * @return the order value
   * @see #LOWEST_PRECEDENCE
   * @see org.springframework.core.Ordered#getOrder()
   */
  public int getOrder()
  {
    return order;
  }



  /**
   * setter for the order property.
   * 
   * @param order
   *          the order to set
   */
  public void setOrder(int order)
  {
    this.order = order;
  }

}
